package com.zhb.designmode.creationmode.single;
/**
 * 饿汉式：不存在线程安全问题
 */
public class Hungry {

    private static Hungry hungry = new Hungry();
    //私有化构造器
    private Hungry() {}

    public static Hungry getInstance(){
        return hungry;
    }
}
